<?php

/**
 * This file is part of the Framework03 PHP framework.
 * @author Walter Tamboer
 * @package Framework03
 */

class FW_Database
{
    /**
     * Creates a new database adapter with the given type and configuration settings.
     * @param string $type The type of adapter to create.
     * @param FW_Config|array The configuration settings for this adapter.
     * @return FW_Database_Adpater_Abstract
     */
    public static function factory($type, $configuration)
    {
        $className = 'FW_Database_Adapter_' . $type;
        
        return new $className($configuration);
    }
}
